package chapter3.No3_2_方法join的使用.demo5;

/**
 * *：
 *    join(long)方法的内部是用wait来实现的，所以会释放锁
 *    sleep()方法不会释放锁
 * Created by Administrator on 2016/11/20.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        ThreadB b = new ThreadB();
        ThreadA a = new ThreadA(b);
        ThreadC c = new ThreadC(b);

        a.start();
        Thread.sleep(1000);
        c.start();
    }
}
